--[[

        attribute.lua
        exported by excel2lua.py
        from file:attribute.xlsx

--]]

local _data = {
  [1] = {id = 101,name = 'attack',des = '攻击',isper = 0,},
  [2] = {id = 102,name = 'defense',des = '防御',isper = 0,},
  [3] = {id = 103,name = 'blood',des = '生命',isper = 0,},
  [4] = {id = 104,name = 'mana',des = '魔法',isper = 0,},
  [5] = {id = 105,name = 'speed',des = '速度',isper = 0,},
  [6] = {id = 107,name = 'crit',des = '暴击率',isper = 1,},
  [7] = {id = 108,name = 'crit_hit',des = '暴击伤害',isper = 1,},
  [8] = {id = 109,name = 'block',des = '格挡率',isper = 1,},
  [9] = {id = 110,name = 'counterattack',des = '反击率',isper = 1,},
  [10] = {id = 111,name = 'counterattack_hurt',des = '反击伤害',isper = 1,},
  [11] = {id = 112,name = 'fire_hurt',des = '火伤加成',isper = 1,},
  [12] = {id = 113,name = 'water_hurt',des = '水伤加成',isper = 1,},
  [13] = {id = 114,name = 'thunder_hurt',des = '雷伤加成',isper = 1,},
  [14] = {id = 115,name = 'fire_resist',des = '火抗',isper = 1,},
  [15] = {id = 116,name = 'water_resist',des = '水抗',isper = 1,},
  [16] = {id = 117,name = 'thunder_resist',des = '雷抗',isper = 1,},
  [17] = {id = 118,name = 'physics_resist',des = '物抗',isper = 1,},
  [18] = {id = 119,name = 'physics_pierce',des = '物理穿透',isper = 1,},
  [19] = {id = 120,name = 'hurt_add',des = '伤害加成',isper = 1,},
  [20] = {id = 121,name = 'hurt_add_mo',des = '魔族伤害加成',isper = 1,},
  [21] = {id = 122,name = 'hurt_add_ren',des = '人族伤害加成',isper = 1,},
  [22] = {id = 123,name = 'hurt_add_xian',des = '仙族伤害加成',isper = 1,},
  [23] = {id = 124,name = 'hurt_add_yao',des = '妖族伤害加成',isper = 1,},
  [24] = {id = 125,name = 'hurt_add_nan',des = '男性伤害加成',isper = 1,},
  [25] = {id = 126,name = 'hurt_add_nv',des = '女性伤害加成',isper = 1,},
  [26] = {id = 127,name = 'hurt_sub',des = '自身伤害减少',isper = 1,},
  [27] = {id = 128,name = 'hurt_resist',des = '免伤',isper = 1,},
  [28] = {id = 129,name = 'confusion_resist',des = '免疫混乱',isper = 1,},
  [29] = {id = 130,name = 'hurt_add_spell',des = '元素伤害加成',isper = 1,},
}

local id_to_index={
   [101] = 1,
   [102] = 2,
   [103] = 3,
   [104] = 4,
   [105] = 5,
   [107] = 6,
   [108] = 7,
   [109] = 8,
   [110] = 9,
   [111] = 10,
   [112] = 11,
   [113] = 12,
   [114] = 13,
   [115] = 14,
   [116] = 15,
   [117] = 16,
   [118] = 17,
   [119] = 18,
   [120] = 19,
   [121] = 20,
   [122] = 21,
   [123] = 22,
   [124] = 23,
   [125] = 24,
   [126] = 25,
   [127] = 26,
   [128] = 27,
   [129] = 28,
   [130] = 29,
}

local attribute={}

function attribute.length() 
   return #_data 
end 

function attribute.indexOf(index) 
   return _data[index] 
end 

function attribute.get(id) 
  return attribute.indexOf(id_to_index[id])
end 

return attribute